import glob

import HTMLTestRunner_PY3,yagmail
from HTMLTestRunner_PY3 import HTMLTestRunner
class TOOL():
    def report(self):
        report = HTMLTestRunner_PY3.HTMLTestRunner(open(r'D:\1\PythonProject1\Report\re.html','wb'),title='测试报告')
        return report
    def sendemail(self):
        at = glob.glob(r'D:\1\PythonProject1\Report\*.html')
        email = yagmail.SMTP(user='3315608326@qq.com',password='hjvhfyfvztaxchei',host='smtp.qq.com')
        email.send(to='3315608326@qq.com',subject='今日测试',attachments=at)
        email.close()


